package com.cheng.gmall.item.service;

import com.cheng.gmall.product.vo.SkuDetailVo;

import java.lang.reflect.Type;
import java.util.concurrent.TimeUnit;

/**
 * @author Cheng-02
 * @version V1.0
 * @Package com.cheng.gmall.item.service
 * @date 2024/5/30 下午5:34
 */
public interface CacheService {
    SkuDetailVo getFromCache(Long skuId);


    //保存商品
    void saveData(Long skuId, Object returnVal);

    Object getCacheData(String s, Type returnType);

    //判定指定的位图中有没有bitMapIndex这个数据
    boolean mightContain(String bitMapName, Long bitMapIndex);

    //给缓存中存放数据
    void saveCacheData(String cachekey, Object o, long ttl, TimeUnit unit);
}
